dirs = dir('D:/JiangShan/tracker_release2/data/Benchmark');
videos = {dirs.name};
videos(strcmp('.', videos) | strcmp('..', videos) | ...
    strcmp('anno', videos) | ~[dirs.isdir]) = [];

%the 'Jogging' sequence has 2 targets, create one entry for each.
%we could make this more general if multiple targets per video
%becomes a common occurence.
%videos(strcmpi('Jogging', videos)) = [];
%videos(end+1:end+2) = {'Jogging.1', 'Jogging.2'};

videos(strcmpi('Human4', videos)) = [];
videos(end+1) = {'Human4.2'};
videos(strcmpi('Skating2', videos)) = [];
videos(end+1:end+2) = {'Skating2.1', 'Skating2.2'};
videos(strcmpi('Jogging', videos)) = [];
videos(end+1:end+2) = {'Jogging.1', 'Jogging.2'};

all_precisions = zeros(numel(videos),1);  %to compute averages
all_fps = zeros(numel(videos),1);

%if ~exist('matlabpool', 'file'),
    %no parallel toolbox, use a simple 'for' to iterate
for k = 96:numel(videos),
    [all_precisions(k), all_fps(k)] = run_tracker(videos{k});
end

mean_precision = mean(all_precisions);
fps = mean(all_fps);
fprintf('\nAverage precision (20px):% 1.3f, Average FPS:% 4.2f\n\n', mean_precision, fps)